If compute_size() returns TRUE, the layout will not be propagated to
GTK. This will be used by the X11 backend to queue asynchronous resizes
that shouldn't yet allocate in GTK.
class = GDK_SURFACE_GET_CLASS (surface);
if (class->compute_size)
- class->compute_size (surface);
+ {
+ if (class->compute_size (surface))
+ return;
+ }
g_signal_emit (surface, signals[LAYOUT], 0, surface->width, surface->height);
}
GdkGLContext *share,
GError **error);
void (* request_layout) (GdkSurface *surface);
- void (* compute_size) (GdkSurface *surface);
+ gboolean (* compute_size) (GdkSurface *surface);
};
#define GDK_SURFACE_DESTROYED(d) (((GdkSurface *)(d))->destroyed)
impl->scale);
}
-static void
+static gboolean
gdk_wayland_surface_compute_size (GdkSurface *surface)
{
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
impl->next_layout.surface_geometry_dirty = FALSE;
}
+
+ return FALSE;
}
static void
}
}
-static void
+static gboolean
gdk_x11_surface_compute_size (GdkSurface *surface)
{
GdkX11Surface *impl = GDK_X11_SURFACE (surface);
impl->next_layout.surface_geometry_dirty = FALSE;
}
+
+ return surface->resize_count > 0;
}
gboolean